const fs = require("fs");
module.exports = function (eventObj) {
  //绑定/自定义事件
  eventObj.on("/", function (res) {
    let data = fs.readFileSync("./views/index.html");
    res.end(data);
  });
  eventObj.on("/product", function (res) {
    let data = fs.readFileSync("./views/product.html");
    res.end(data);
  });

  eventObj.on("/users", function (res) {
    let data = fs.readFileSync("./views/users.html");
    res.end(data);
  });
};
